Add ParseVersionValue helper to eliminate version parsing duplication#8248
Merged
Add ParseVersionValue helper to eliminate version parsing duplication#8248
Conversation
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Create reusable parseVersionValue helper function
Add ParseVersionValue helper to eliminate version parsing duplication
Dec 31, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Version value coercion logic (string/int/float → string) was duplicated across three locations: engine configuration parsing and two MCP tool version handlers.
Changes
stringutil.ParseVersionValue(): Handles string, int, int64, uint64, float64 types. Returns empty string for unsupported types.pkg/workflow/engine.go(engine version field)pkg/parser/mcp.go(GitHub MCP Docker image version)pkg/parser/mcp.go(Playwright Docker image version)Example
Before:
After:
Note: Placed in
pkg/stringutil(notpkg/workflow/config_helpers) to avoid circular import betweenworkflow↔parserpackages.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/user/usr/bin/gh gh api user --jq .login -json GO111MODULE 0.1-go1.25.0.linGOMODCACHE GOINSECURE GOMOD GOMODCACHE /home/REDACTED/go/GO111MODULE -V=f�� GOPATH GOPROXY ux-amd64/pkg/tool/linux_amd64/vet GOSUMDB GOWORK pkg/mod/golang.oGOPATH ux-amd64/pkg/tool/linux_amd64/vet(http block)/usr/bin/gh gh api user --jq .login ithub/workflows -test.v=true /home/REDACTED/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.25.0.linux-amd64/pkg/tool/linux_amd64/co/tmp/validate-js-2645958109.cjs -test.run=^Test GOWORK l/linux_amd64/cgo /home/REDACTED/go/pkg/mod/golang.o/tmp/gh-aw/aw.patch -o k/gh-aw/gh-aw/.github/workflows -trimpath ps by/68235995b14f8gh main -lang=go1.25 ps(http block)/usr/bin/gh gh api user --jq .login ithub/workflows go ps -json GO111MODULE ux-amd64/bin/go ps -pyt�� -python.git /home/REDACTED/go/GO111MODULE(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.